function ISG_SolutionAnalysis
	gameModel=GameModel; 
	model=gameModel.prepareForIsg();
	affineModel=gameModel.prepareForAffine;
	intervalModel=gameModel.prepareForIntervalSg;
	
	
	Tsize=length(model.targets);
    C=zeros(Tsize,1);
    maxPayoff=0;
    minPayoff=min(model.Uud);
    e=2;
	 
	Dv=minPayoff:e:maxPayoff;
	minRes_D=[];
	minResIndex_D=[];
	resCosts_D=[];
	totalCovAffine_D=[];
	totalCovInterval_D=[];
	
	Carr_D=[];
	total_D=[];
	target_D=[];
	
	
	
	for D=minPayoff:e:maxPayoff
        D
        e=2;
        targets=model.targets;
        Uud    =model.Uud;
        Ucd    =model.Ucd;
        UuaMin =model.UuaMin;
        UuaMax =model.UuaMax;
        UcaMin =model.UcaMin;
        UcaMax =model.UcaMax;
		[ret,Carr, totalC, target]=feasibilityCheckWithAllSolution(D,C);
        if isempty(target) || isempty(totalC)
            Carr_D=[Carr_D,zeros(Tsize,1)];
            total_D=[total_D,25];
            target_D=[target_D,-1];		
            minRes_D=[minRes_D, 25];
            minResIndex_D=[minResIndex_D, -1];	
            totalCovAffine_D=[totalCovAffine_D,AffineForm(Interval(0,0,'zero'))];
            totalCovInterval_D=[totalCovInterval_D,Interval(0,0,'zero')];
        else
            Carr_D=[Carr_D,Carr];
            total_D=[total_D,totalC];
            target_D=[target_D,target];		
            [minRes,res_I]=min(totalC);
            minRes_D=[minRes_D, minRes];
            minResIndex_D=[minResIndex_D, res_I];	
            [CAff, totalCovAffine]=interCoverageDistribution(affineModel, D, target(res_I));
            [CInt, totalCovInterval]=interCoverageDistribution(intervalModel, D, target(res_I));
            totalCovAffine_D=[totalCovAffine_D,totalCovAffine];
            totalCovInterval_D=[totalCovInterval_D,totalCovInterval];
        end
		
	   
        
        
		
	end
	
	
	
	resFunct = @(m) 7*m+2;
	
	resCosts_D=arrayfun(resFunct,minRes_D);
	
	totalPayoff_D=Dv-resCosts_D;
	
	[finalPayoff,I]=max(totalPayoff_D);
	
	finalD=Dv(I);
	finalResCosts=minRes_D(I);
	finalResIndex=minResIndex_D(I);
	finalTarget=target_D(I);
	finalCovArray=Carr_D(:,I);
	
	finalTargetSet=target_D(:,I);
	finalTotalCovSet=total_D(:,I);
	
    IntervalPlotter.plotIntervalCurve(Dv, minRes_D, totalCovAffine_D, totalCovInterval_D, finalD, totalCovInterval_D(I));
    
	for i=1:length(finalTargetSet)
		[CAff, finalTotalCovAffineIntervals(i)]=interCoverageDistribution(affineModel, finalD, finalTargetSet(i));
		[CInt, finalTotalCovIntervals(i)]      =interCoverageDistribution(intervalModel, finalD, finalTargetSet(i));
	end
	
	IntervalPlotter.plotIsgWithAffineAndInterval(finalTargetSet, finalTotalCovSet, finalTotalCovAffineIntervals, finalTotalCovIntervals);
	
	
	
	[CAffine, totalCovAffine]=interCoverageDistribution(affineModel, finalD, finalTarget)
	[CInterval, totalCovInterval]=interCoverageDistribution(intervalModel, finalD, finalTarget)
	
	IntervalPlotter.plotIsgWithAffineAndInterval(1:length(finalCovArray), finalCovArray, CAffine, CInterval);
	
	
	
	
	
	
	
	
	
	
	
	function [ret,Carr, totalC, target]=feasibilityCheckWithAllSolution(midPoint,C)
		c1=zeros(1,Tsize);
        Carr=[];
		totalC=[];
		target=[];
		for t=1:Tsize
          c1(t)= get_c1(t);
        end
        for t=1:Tsize
            totalCov=c1(t);
            C(t)=c1(t);
            if C(t)>1
              continue  
            end
            R=get_R(c1(t),t);
            for tj=1:Tsize
                if(t==tj)
                    continue
                end
                c2=get_c2(R,tj);
                c3=get_c3(R,tj);
                minCov=max([c3,min(c1(t),c2)]);
                if minCov<0 || minCov>1
                    break
                end
                totalCov=totalCov+minCov;
                C(tj)=minCov;
            end
            if (minCov>=0 && minCov<=1) %&& totalCov<=m
                ret='true';
				totalC=[totalC,totalCov];
				Carr=[Carr,C];
				target=[target,t];
             end
        end
        if length(target)==0
			ret='false';
            return
        end
        [totalC,I]=min(totalC);
        target=target(I);
        Carr=Carr(:,I);
        return 
        
        
        function c1=get_c1(t)
            %cash=1-(midPoint-Uud(t))/(Ucd(t)-Uud(t));
            cash=(midPoint-Uud(t))/(Ucd(t)-Uud(t));
            c1=max([0,cash]);        
        end
        function c2=get_c2(R,t)
            %cash=1-(R-UuaMax(t))/(UcaMax(t)-UuaMax(t));
            upBound=max(UuaMax(t),UcaMax(t));
            lowBound=min(UuaMax(t),UcaMax(t));
            if R<lowBound 
                c2=2;
                return;
            end
            
            if R>upBound 
                c2=0;
                return;
            end
            cash=(R-UuaMax(t))/(UcaMax(t)-UuaMax(t));
            c2=max([0,cash]); 
        end
        function c3=get_c3(R,t)
            %cash=1-(R-UuaMin(t))/(UcaMin(t)-UuaMin(t));
            upBound=max(UuaMin(t),UcaMin(t));
            lowBound=min(UuaMin(t),UcaMin(t));
            if R<lowBound 
                c3=2;
                return;
            end
            
            if R>upBound 
                c3=0;
                return;
            end
            cash=(R-UuaMin(t))/(UcaMin(t)-UuaMin(t));
            c3=max([0,cash]); 
        end
        function R=get_R(c1,t)
            R=(c1*UcaMin(t))+((1-c1)*UuaMin(t)-e);
        end
	
    end
	
	
	
	
	
	function [C, totalCov]=interCoverageDistribution(model, midPoint, trgt)
        if isempty(trgt)
            C=model.coverageVector;
            totalCov=-1;
            return;
        end
		Uud    =model.Uud;
        Ucd    =model.Ucd;
        Uua    =model.Uua;
        Uca    =model.Uca;
		C      =model.coverageVector;
		Tsize=length(C);
        e=0.05;
		for t=1:Tsize
          c1(t)= get_c1(t);
        end
		totalCov=c1(trgt);
		C(trgt)=c1(trgt);
		R=get_R(c1(trgt),trgt);
		for tj=1:Tsize
			if(trgt==tj)
				continue
			end
			c2=get_c2(R,tj);
			minCov=min(c1(tj),c2);
			totalCov=totalCov+minCov;
			C(tj)=minCov;
		end
        return 
        function c1=get_c1(t)
                %cash=1-(midPoint-Uud(t))/(Ucd(t)-Uud(t));
                cash=(midPoint-Uud(t))/(Ucd(t)-Uud(t));
                c1=max(cash,0);        
        end
		function c2=get_c2(R,t)
			upBound=max(Uua(t),Uca(t));
			lowBound=min(Uua(t),Uca(t));
			if R<lowBound 
				c2=2;
				return;
			end

			if R>upBound 
				c2=0;
				return;
			end
			cash=(R-Uua(t))/(Uca(t)-Uua(t));
			c2=max(cash,0); 
		end
		function R=get_R(c1,t)
			R=(c1*Uca(t))+((1-c1)*Uua(t)-e);
		end
    end
end